<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use frontend\widgets\article\ArticleWidget;
use yii\base\Widget;

/* @var $this yii\web\View */
/* @var $model frontend\models\ArticleForm */
/* @var $form ActiveForm */
/* @array $cate = Cate::getAllCate(); */

$this->title = "创建文章";
$this->params['breadcrumbs'][] = ['label' => '文章', 'url' => ['article/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="row">
    <div class="col-lg-9">
        <div class="panel-title">
            <span>创建文章</span>
        </div>

        <div class="panel-body">
            <?php $form = ActiveForm::begin(); ?>

            <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>

            <?= $form->field($model, 'cat_id')->dropDownList($cate) ?>

            <?= $form->field($model, 'label_img')->widget('common\widgets\file_upload\FileUpload', [
                'config' => [
                    //图片上传的一些配置，不写调用默认配置
                    //'domain_url' => 'http://www.yii-china.com',
                ]
            ]) ?>

            <?= $form->field($model, 'content')->widget('common\widgets\ueditor\Ueditor',[
    'options'=>[
        'initialFrameHeight' => 350,
        'toolbars' => [
            ['insertcode', 'undo', 'forecolor', 'justifyleft', 'justifycenter', 'justifyright', 'indent', 'simpleupload', 'fullscreen'],
         ]
    ]
]) ?>

            <?= $form->field($model, 'tags')->widget('common\widgets\tags\TagWidget', [
                'options' => [
                    
            ]
            ]) ?>
            <div class="form-group nomargin">
            <p class="help-block">提示：输入标签文字后回车即可</p>
			</div>


            <div class="form-group">
                <?= Html::submitButton(Yii::t('language', 'Submit'), ['class' => 'btn btn-primary']) ?>
            </div>


            <?php ActiveForm::end(); ?>
        </div>
    </div>

    <div class="col-lg-3">
        <div class="panel-title box-title">
            <span>注意事项</span>
        </div>

        <div class="panel-body">
            <p>1. 不能发表带恐怖，色情的文章。</p>
            <p>2. 不能发表那只那啥那啥那啥。</p>
            <p>3. 注意形象！</p>
        </div>
    </div>

</div>
